package com.cqjtu.eecs.controller;


import com.cqjtu.eecs.entity.vo.GraduateRequirementDetailVo;
import com.cqjtu.eecs.service.IGraduateRequirementTemplateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 毕业要求模板 前端控制器
 * </p>
 *
 * @author   
 * @since 2022-02-28
 */
@RestController
@RequestMapping("/graduate-requirement-template")
@Api(tags = "毕业要求模板接口")
public class GraduateRequirementTemplateController {

    @Autowired
    private IGraduateRequirementTemplateService graduateRequirementService;

    @GetMapping("/{majorCode}/{versionCode}")
    @ApiOperation(value = "根据专业代码和版本编号查询毕业要求")
    public List<GraduateRequirementDetailVo> getGraduateRequirementDetailByMajorCodeAndVersionCode(@PathVariable String majorCode, @PathVariable String versionCode) {
        return graduateRequirementService.getGraduateRequirementDetailByMajorCodeAndVersionCode(majorCode, versionCode);
    }
}
